package main


import (
    "fmt"

)


func getKey(m map[string] string) []string{

    keys := make([]string, 0, len(m))
    for k := range m {
        keys = append(keys, k)
    }
    return keys

}

func main(){

    //name := make(map[string] string)
    var name map[string]string = make(map[string] string) 
    //或者 var name = make(map[string] string)
    //不能写层 var name map[string]string   ，会报空指针的错误
    name["aa"] = "lynzhang"
    for k,v := range name {
        fmt.Println(k, v)
    }
    fmt.Println(getKey(name))
}
